package com.garrett.demo.sys.dao;

import com.garrett.demo.sys.entity.Account;
import com.garrett.demo.sys.entity.UserInfo;

public class UserDataBaseDemo implements UserDao{

    private Account onlyAccount = new Account("1","admin","admin");
    private UserInfo onlyUser = new UserInfo("1","学号（212006677）","你的姓名");

    @Override
    public UserInfo getUserById(String id) {
        if(onlyUser.getId().equals(id)){
            return onlyUser;
        }
        return null;
    }

    @Override
    public Account getUserByAccount(String account) {
        if (onlyAccount.getAccount().equals(account)) {
            return onlyAccount;
        }
        return null;
    }
}
